function [] = fig_sec12_3_ospfWeightLocalSearch ()

close all;

D=[1 15]; numD = numel (D);
fileRoot = ['data/ospfWeghtOptimization_ls']



congestion_ff_d1 = load ([fileRoot '_D1_FF_objFunc.txt']); 
congestion_ff_d15 = load ([fileRoot '_D15_FF_objFunc.txt']); 
congestion_bf_d1 = load ([fileRoot '_D1_BF_objFunc.txt']); 
congestion_bf_d15 = load ([fileRoot '_D15_BF_objFunc.txt']); 

time_ff_d1 = load ([fileRoot '_D1_FF_time.txt']); 
time_ff_d15 = load ([fileRoot '_D15_FF_time.txt']); 
time_bf_d1 = load ([fileRoot '_D1_BF_time.txt']); 
time_bf_d15 = load ([fileRoot '_D15_BF_time.txt']); 

% compare D=1,16 in best fit
figure1 = figure;
plot (time_bf_d1(:,2),congestion_bf_d1(:,2),'ko');
hold;
plot (time_bf_d15(:,2),congestion_bf_d15(:,2),'kx');

xlabel ('Running time','FontName' , 'Times' ,'FontSize' , 11);
ylabel ('Congestion','FontName' , 'Times' ,'FontSize' , 11);
legend ('D=1' , 'D=15','FontName' , 'Times' ,'FontSize' , 11);
annotation(figure1,'textbox',[0.431357142857142 0.788095238095239 0.224 0.114285714285716],'String',{'Best-fit'},'FitBoxToText','off',...
    'LineStyle','none','FontName' , 'Times' ,'FontSize' , 11);


% compare D=1,16 in first fit
figure1 = figure;
plot (time_ff_d1(:,2),congestion_ff_d1(:,2),'ko');
hold;
plot (time_ff_d15(:,2),congestion_ff_d15(:,2),'kx');
xlabel ('Running time','FontName' , 'Times' ,'FontSize' , 11);
ylabel ('Congestion','FontName' , 'Times' ,'FontSize' , 11);
legend ('D=1' , 'D=15','FontName' , 'Times' ,'FontSize' , 11);
annotation(figure1,'textbox',[0.431357142857142 0.788095238095239 0.224 0.114285714285716],'String',{'First-fit'},'FitBoxToText','off',...
    'LineStyle','none','FontName' , 'Times' ,'FontSize' , 11);
%axes('fontname' , 'times' ,'fontsize' , 11);

avgTime_ff_d1 = mean(time_ff_d1(:,2))
avgTime_ff_d15 = mean(time_ff_d15(:,2))
avgTime_bf_d1 = mean(time_bf_d1(:,2))
avgTime_bf_d15 = mean(time_bf_d15(:,2))

avgCong_ff_d1 = mean(congestion_ff_d1(:,2))
avgCong_ff_d15 = mean(congestion_ff_d15(:,2))
avgCong_bf_d1 = mean(congestion_bf_d1(:,2))
avgCong_bf_d15 = mean(congestion_bf_d15(:,2))

